package com.qf.jie.dao.impl;

import com.qf.jie.dao.AdminDao;
import com.qf.jie.entity.po.Admin;
import com.qf.jie.utils.DBUtils;

import java.util.List;

public class AdminDaoImpl implements AdminDao {
    @Override
    public int addBean(Admin admin) {
        return 0;
    }

    @Override
    public int deleteById(int id) {
        return 0;
    }

    @Override
    public int updateById(Admin admin) {
        return 0;
    }

    @Override
    public int shamDeleteById(int id) {
        return 0;
    }

    @Override
    public int getCount() {
        return 0;
    }

    @Override
    public int getIdByName(String name) {
        return 0;
    }

    @Override
    public int getCountByName(String username) {
        return 0;
    }

    @Override
    public int getIdByNameAndPassword(String name, String password) {
        return DBUtils.excuteQuery("select * from admin where name=? and password=?", name, password);
    }


    @Override
    public List<Admin> getList() {
        return null;
    }

    @Override
    public List<Admin> getList(int start, int len) {
        return null;
    }

    @Override
    public List<Admin> getListLike(String name) {
        return null;
    }

    @Override
    public List<Admin> getBeanById(int id) {
        return DBUtils.excuteQuery(Admin.class,"select * from admin where id=?", id);
    }

}
